package cn.itcast.bos.dao.base;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.base.Courier;

/**
 * 快递员的数据访问类接口
 * 
 * @author 张立
 * @version 1.0 2017-9-4 21:13:10
 */
public interface CourierRepository extends JpaRepository<Courier, Integer>,JpaSpecificationExecutor<Courier> {

	Page<Courier> findAll(Specification<Courier> specification, Pageable pageable);

	// 自定义dao的修改方法
	@Query(value="update Courier set deltag='1' where id=?")
	@Modifying
	public void updateDelTag(Integer id);

}
